Accusoft.ImagXpress13.Net
Modify Image Bit Depth

The following Processor methods all can be used to reduce the bit depth of an image: 

Change Color Depth

The ColorDepth method changes the bits per pixel of the current image.

The UniqueColors method returns the number of unique colors in the current image or region. This can be useful for determining if there is an opportunity to reduce the bit depth of the pixels without degrading the image. 
If an image bit depth is modified from an image that is greater than 16 bits to an image that is 8 bits or less in depth, then a palette is associated with the image, as specified by the paletteType parameter when calling the ColorDepth method. 

Reduce GrayScale Bit Depth 

It may be advantageous to reduce the bit depth of a gray image, as most humans can only discern 256 shades of gray. To level an 8 through 16-bit image to an 8-bit gray image, call the ApplyGrayscaleTransform method to modify the image (permanently). To apply the DICOM standard transformation method to level a medical image, call ApplyGrayscaleTransform(Medical). To apply a simple linear method to level the image, call ApplyGrayscaleTransform(Int32,Int32). 

Binarize

The Binarize method operates on 1-bit and 24-bit input images, permanently modifying the image to a 1-bit or 8-bit grayscale DIB of the same dimensions.

The Autobinarize method operates on 1-bit and 24-bit input images, automatically selecting the optimal binarize parameters to convert to a 1-bit monochrome image.

This is often done to clean up an image or apply an image effect 

See Also

 

 


©2014. Accusoft Corporation. All Rights Reserved.

Send Feedback